﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using Haozes.FxClient.Sip;

namespace Haozes.FxClient.CommUtil
{
    public class DebugWriter
    {
        [Conditional("DEBUG")]
        public static void WriteSendPacket(SipMessage p)
        {
            Console.WriteLine(">>>>>>>>>>>>>>>>> my send start >>>>>>>>>>>>>>");
            Console.WriteLine(p);
            Trace.WriteLine(p);
            Console.WriteLine(">>>>>>>>>>>>>>>> my send end >>>>>>>>>>>>>>>>>>");
        }

        [Conditional("DEBUG")]
        public static void WriteLine(string str)
        {
            Console.WriteLine("DEBUG INFO:" + str);
            Trace.WriteLine("DEBUG INFO:" + str);
        }

        [Conditional("DEBUG")]
        public static void WriteRCVPacket(SipMessage p)
        {
            Console.WriteLine("<<<<<<<<<<<<<<< my rcv start <<<<<<<<<<<<<");
            Console.WriteLine(p);
            Trace.WriteLine(p);
            Console.WriteLine("<<<<<<<<<<<<<<< my rcv end <<<<<<<<<<<<<<");
        }
    }
}
